import service from "../../utils/request.ts";


export const pageList=(data)=>{
    return   service({
        url: `/question/page`,
        method: 'post',
        data: data
    })
}
export const addQuestion=(data)=>{
    return   service({
        url: `/question/add`,
        method: 'post',
        data: data
    })
}

export const removeQuestionById=(id)=>{
    return   service({
        url: `/question/delete/${id}`,
        method: 'delete',
        data: null
    })
}

export const deleteQuestionByIdBatch=(data)=>{
    return   service({
        url: `/question`,
        method: 'delete',
        data: data
    })
}


export const getQuestionById=(id)=>{
    return   service({
        url: `/question/${id}`,
        method: 'get',
        data: null
    })
}
/**
 * 修改
 * @param data
 */
export const updateQuestionInfo=(data)=>{
    return   service({
        url: `/question/update`,
        method: 'put',
        data: data
    })
}
/**
 * 修改
 * @param bankId
 * @param data
 */
export const importQuestion=(bankId,data)=>{
    return   service({
        url: `/question/import`,
        method: 'post',
        params: {bankId},
        data: data
    })
}
export const getBankQuestionPage=(id,data)=>{
    return   service({
        url: `/question/${id}/page`,
        method: 'get',
        params:data,
        data: null
    })
}

